home *** CD-ROM | disk | FTP | other *** search
/ Champak 106 / Vol 106.iso / games / rain_for.swf / scripts / __Packages / DiegoHome.as < prev    next >
Encoding:
Text File  |  2010-04-12  |  462 b   |  22 lines

  1. class DiegoHome extends BuildingPart
  2. {
  3.    function DiegoHome()
  4.    {
  5.       super();
  6.    }
  7.    function render()
  8.    {
  9.       var _loc2_ = smashing.Viewport.getPos(this);
  10.       if(_loc2_.x > smashing.Viewport.halfWidth)
  11.       {
  12.          this._visible = false;
  13.       }
  14.       else
  15.       {
  16.          this._visible = true;
  17.          this._x = _loc2_.x + smashing.Viewport.centerX;
  18.          this._y = _loc2_.y + smashing.Viewport.centerY;
  19.       }
  20.    }
  21. }
  22.